package com.ww.learn.coroutine.context

import kotlinx.coroutines.CoroutineName
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking

fun main() = runBlocking<Unit> {
    // 打印结果
//    DefaultDispatcher-worker-1 @test#2
    launch (Dispatchers.Default + CoroutineName("test")) {
        println("${Thread.currentThread().name}")
    }
}